class RewardDetailModel {
  int? errcode;
  String? errmsg;
  Data? data;
  String? message;

  RewardDetailModel({this.errcode, this.errmsg, this.data, this.message});

  RewardDetailModel.fromJson(Map<String, dynamic> json) {
    errcode = json['errcode'];
    errmsg = json['errmsg'];
    data = json['data'] != null ? new Data.fromJson(json['data']) : null;
    message = json['message'];
  }

  Map<String, dynamic> toJson() {
    final Map<String, dynamic> data = new Map<String, dynamic>();
    data['errcode'] = this.errcode;
    data['errmsg'] = this.errmsg;
    if (this.data != null) {
      data['data'] = this.data!.toJson();
    }
    data['message'] = this.message;
    return data;
  }
}

class Data {
  int? id;
  String? typeName;
  String? status;
  String? cases;
  int? money;
  String? thing;
  String? date;
  Attachment? attachment;

  Data(
      {this.id,
        this.typeName,
        this.status,
        this.cases,
        this.money,
        this.thing,
        this.date,
        this.attachment});

  Data.fromJson(Map<String, dynamic> json) {
    id = json['id'];
    typeName = json['type_name'];
    status = json['status'];
    cases = json['cases'];
    money = json['money'];
    thing = json['thing'];
    date = json['date'];
    attachment = json['attachment'] != null
        ? new Attachment.fromJson(json['attachment'])
        : null;
  }

  Map<String, dynamic> toJson() {
    final Map<String, dynamic> data = new Map<String, dynamic>();
    data['id'] = this.id;
    data['type_name'] = this.typeName;
    data['status'] = this.status;
    data['cases'] = this.cases;
    data['money'] = this.money;
    data['thing'] = this.thing;
    data['date'] = this.date;
    if (this.attachment != null) {
      data['attachment'] = this.attachment!.toJson();
    }
    return data;
  }
}

class Attachment {
  int? id;
  String? url;
  String? previewUrl;
  String? mimetype;
  String? name;
  String? num;
  String? unit;
  String? checksum;
  String? icon;

  Attachment(
      {this.id,
        this.url,
        this.previewUrl,
        this.mimetype,
        this.name,
        this.num,
        this.unit,
        this.checksum,
        this.icon});

  Attachment.fromJson(Map<String, dynamic> json) {
    id = json['id'];
    url = json['url'];
    previewUrl = json['preview_url'];
    mimetype = json['mimetype'];
    name = json['name'];
    num = json['num'];
    unit = json['unit'];
    checksum = json['checksum'];
    icon = json['icon'];
  }

  Map<String, dynamic> toJson() {
    final Map<String, dynamic> data = new Map<String, dynamic>();
    data['id'] = this.id;
    data['url'] = this.url;
    data['preview_url'] = this.previewUrl;
    data['mimetype'] = this.mimetype;
    data['name'] = this.name;
    data['num'] = this.num;
    data['unit'] = this.unit;
    data['checksum'] = this.checksum;
    data['icon'] = this.icon;
    return data;
  }
}
